//
//  UserClient.h
//  HiMaster3
//
//  Created by jinghao on 16/4/15.
//  Copyright © 2016年 jinghao. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "SAMKeychain.h"
#import "AppConfigModel.h"

typedef NS_ENUM(NSInteger, MasterLoginType) {
    MasterLoginType_none = 0,
    MasterLoginType_Phone ,
    MasterLoginType_QQ,
    MasterLoginType_Weixin,
    MasterLoginType_Sina
};

@interface UserClient : NSObject
@property (nonatomic,readonly)BOOL rawLogin;                //是否已经登陆
@property (nonatomic,readonly)BOOL isMaster;                //是否是达人

@property (nonatomic,readonly)NSString* userName;           //已登录的手机号
@property (nonatomic,readonly)NSString* password;           //已登录的密码
@property (nonatomic,readonly)NSString* accessToken;        //访问的token
@property (nonatomic,readonly)MasterLoginType loginType;    //登陆类型
@property (nonatomic,strong)NSDictionary *loginInfo;        //第三方登陆信息
@property (nonatomic,strong)NSDictionary *userLoginInfo;         //用户登陆信息
@property (nonatomic,strong)NSDictionary *userInfo;         //用户资料信息
@property (nonatomic,strong)NSDictionary *userStateInfo;     // 用户状态信息
//@property (nonatomic,strong)NSDictionary *userproductInfo;  //用户开启守护上传资料保存

@property (nonatomic,strong)NSString * userId;         //用户信息
@property (nonatomic,strong)NSString * unionId;
@property (nonatomic,strong)NSString * firstContractName;
@property (nonatomic,assign)NSNumber * setBaseInfo;
@property (nonatomic,strong)NSString * city_code;
@property (nonatomic,strong)NSString * currentVC;
@property (nonatomic,strong, readonly)NSString * openType; //开启喝阻 3  开启紧急 2  开启守护 1
@property (nonatomic,strong, readonly)NSString * openTypeId;



+ (instancetype)sharedUserClient;

- (void)setUserName:(NSString*)userName password:(NSString*)password;
- (void)saveSetbaseInfo:(NSNumber *)setBaseInfo;
- (void)setLoginType:(MasterLoginType)type;
- (void)setOpenTypeStatus:(NSArray *)type;
- (void)setLoginTypeName:(NSString*)typeName;
- (void)outLogin;
-(void)cancleHelp;
- (void)updateSecurityCode:(NSString *)SecurityCode;
-(void)changeFirstContractName :(NSString *)name;
- (void)updatephone:(NSString *)phone;
@end
